gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 0, 0);
}
+#define BUS_NAME "org.gtk.TestMenus"
+#define OBJ_PATH "/org/gtk/TestMenus"
+
int
main (int argc, char *argv[])
{
if (do_import)
{
g_print ("Getting menus from the bus...\n");
- model = (GMenuModel*)g_menu_proxy_get (bus, "org.gtk.TestMenus", "/path");
+ model = (GMenuModel*)g_menu_proxy_get (bus, BUS_NAME, OBJ_PATH);
g_print ("Getting actions from the bus...\n");
- group = (GActionGroup*)g_dbus_action_group_new_sync (bus, "org.gtk.TestMenus", "/path", 0, NULL, NULL);
+ group = (GActionGroup*)g_dbus_action_group_new_sync (bus, BUS_NAME, OBJ_PATH, 0, NULL, NULL);
}
else
{
if (do_export)
{
g_print ("Exporting menus on the bus...\n");
- if (!g_menu_exporter_export (bus, "/path", model, &error))
+ if (!g_menu_exporter_export (bus, OBJ_PATH, model, &error))
{
g_warning ("Menu export failed: %s", error->message);
exit (1);
}
g_print ("Exporting actions on the bus...\n");
- if (!g_action_group_exporter_export (bus, "/path", group, &error))
+ if (!g_action_group_exporter_export (bus, OBJ_PATH, group, &error))
{
g_warning ("Action export failed: %s", error->message);
exit (1);
}
- g_bus_own_name_on_connection (bus, "org.gtk.TestMenus",
- 0, NULL, NULL, NULL, NULL);
+ g_bus_own_name_on_connection (bus, BUS_NAME, 0, NULL, NULL, NULL, NULL);
}
else
{